package com.hj.authority.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;

import com.hj.authority.utils.TreeNode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.Instant;

/**
 * @author hj
 * @Date 2023/4/27
 * @Description: 菜单
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "菜单")
public class SysMenuVO extends TreeNode<SysMenuVO> {

    @Schema(description = "菜单名称")
    private String name;

    @Schema(description = "菜单URL")
    private String url;

    @Schema(description = "类型  0：菜单   1：按钮   2：接口")
    private Integer type;

    @Schema(description = "打开方式   0：内部   1：外部")
    private Integer openStyle;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "授权标识(多个用逗号分隔，如：sys:menu:list,sys:menu:save)")
    private String authority;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Instant createTime;

    @Schema(description = "上级菜单名称")
    private String parentName;

}